package org.dfzt.modules.online.cgform.util;

import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;


class m {
    private static final String a = "FECO#$N*CX";
    private static final Charset b = Charset.forName("UTF-8");
    private static byte[] c = "FECO#$N*CX".getBytes(b);


    public static String a(String paramString) {
        byte[] arrayOfByte = paramString.getBytes(b);
        byte b1;
        int i;
        for (b1 = 0, i = arrayOfByte.length; b1 < i; b1++) {
            for (byte b2 : c) {
                arrayOfByte[b1] = (byte) (arrayOfByte[b1] ^ b2);
            }
        }
        return new String(arrayOfByte);
    }


    public static String b(String paramString) {
        byte[] arrayOfByte1 = paramString.getBytes(b);
        byte[] arrayOfByte2 = arrayOfByte1;
        byte b1;
        int i;
        for (b1 = 0, i = arrayOfByte1.length; b1 < i; b1++) {
            for (byte b2 : c) {
                arrayOfByte1[b1] = (byte) (arrayOfByte2[b1] ^ b2);
            }
        }
        return new String(arrayOfByte1);
    }


    public static String c(String paramString) {
        MessageDigest messageDigest = null;
        try {
            messageDigest = MessageDigest.getInstance("MD5");
            messageDigest.reset();
            messageDigest.update(paramString.getBytes("UTF-8"));
        } catch (NoSuchAlgorithmException noSuchAlgorithmException) {

        } catch (UnsupportedEncodingException unsupportedEncodingException) {
        }


        byte[] arrayOfByte = messageDigest.digest();

        StringBuffer stringBuffer = new StringBuffer();


        for (byte b1 = 0; b1 < arrayOfByte.length; b1++) {
            if (Integer.toHexString(0xFF & arrayOfByte[b1]).length() == 1) {
                stringBuffer.append("0").append(Integer.toHexString(0xFF & arrayOfByte[b1]));
            } else {
                stringBuffer.append(Integer.toHexString(0xFF & arrayOfByte[b1]));
            }
        }
        return stringBuffer.toString();
    }
}
